.TH "QwtPlotGrid" 3 "Mon Jun 1 2020" "Version 6.1.5" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtPlotGrid \- A class which draws a coordinate grid\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_plot_grid\&.h>\fP
.PP
Inherits \fBQwtPlotItem\fP\&.
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtPlotGrid\fP ()"
.br
.RI "Enables major grid, disables minor grid\&. "
.ti -1c
.RI "virtual \fB~QwtPlotGrid\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "virtual int \fBrtti\fP () const"
.br
.ti -1c
.RI "void \fBenableX\fP (bool)"
.br
.RI "Enable or disable vertical grid lines\&. "
.ti -1c
.RI "bool \fBxEnabled\fP () const"
.br
.ti -1c
.RI "void \fBenableY\fP (bool)"
.br
.RI "Enable or disable horizontal grid lines\&. "
.ti -1c
.RI "bool \fByEnabled\fP () const"
.br
.ti -1c
.RI "void \fBenableXMin\fP (bool)"
.br
.RI "Enable or disable minor vertical grid lines\&. "
.ti -1c
.RI "bool \fBxMinEnabled\fP () const"
.br
.ti -1c
.RI "void \fBenableYMin\fP (bool)"
.br
.RI "Enable or disable minor horizontal grid lines\&. "
.ti -1c
.RI "bool \fByMinEnabled\fP () const"
.br
.ti -1c
.RI "void \fBsetXDiv\fP (const \fBQwtScaleDiv\fP &)"
.br
.ti -1c
.RI "const \fBQwtScaleDiv\fP & \fBxScaleDiv\fP () const"
.br
.ti -1c
.RI "void \fBsetYDiv\fP (const \fBQwtScaleDiv\fP &)"
.br
.ti -1c
.RI "const \fBQwtScaleDiv\fP & \fByScaleDiv\fP () const"
.br
.ti -1c
.RI "void \fBsetPen\fP (const QColor &, qreal width=0\&.0, Qt::PenStyle=Qt::SolidLine)"
.br
.ti -1c
.RI "void \fBsetPen\fP (const QPen &)"
.br
.ti -1c
.RI "void \fBsetMajorPen\fP (const QColor &, qreal width=0\&.0, Qt::PenStyle=Qt::SolidLine)"
.br
.ti -1c
.RI "void \fBsetMajorPen\fP (const QPen &)"
.br
.ti -1c
.RI "const QPen & \fBmajorPen\fP () const"
.br
.ti -1c
.RI "void \fBsetMinorPen\fP (const QColor &, qreal width=0\&.0, Qt::PenStyle=Qt::SolidLine)"
.br
.ti -1c
.RI "void \fBsetMinorPen\fP (const QPen &)"
.br
.ti -1c
.RI "const QPen & \fBminorPen\fP () const"
.br
.ti -1c
.RI "virtual void \fBdraw\fP (QPainter *, const \fBQwtScaleMap\fP &xMap, const \fBQwtScaleMap\fP &yMap, const QRectF &canvasRect) const"
.br
.RI "Draw the grid\&. "
.ti -1c
.RI "virtual void \fBupdateScaleDiv\fP (const \fBQwtScaleDiv\fP &\fBxScaleDiv\fP, const \fBQwtScaleDiv\fP &\fByScaleDiv\fP)"
.br
.in -1c
.SS "Additional Inherited Members"
.SH "Detailed Description"
.PP 
A class which draws a coordinate grid\&. 

The \fBQwtPlotGrid\fP class can be used to draw a coordinate grid\&. A coordinate grid consists of major and minor vertical and horizontal grid lines\&. The locations of the grid lines are determined by the X and Y scale divisions which can be assigned with \fBsetXDiv()\fP and \fBsetYDiv()\fP\&. The \fBdraw()\fP member draws the grid within a bounding rectangle\&. 
.SH "Member Function Documentation"
.PP 
.SS "void QwtPlotGrid::draw (QPainter * painter, const \fBQwtScaleMap\fP & xMap, const \fBQwtScaleMap\fP & yMap, const QRectF & canvasRect) const\fC [virtual]\fP"

.PP
Draw the grid\&. The grid is drawn into the bounding rectangle such that grid lines begin and end at the rectangle's borders\&. The X and Y maps are used to map the scale divisions into the drawing region screen\&.
.PP
\fBParameters\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIxMap\fP X axis map 
.br
\fIyMap\fP Y axis 
.br
\fIcanvasRect\fP Contents rectangle of the plot canvas 
.RE
.PP

.PP
Implements \fBQwtPlotItem\fP\&.
.SS "void QwtPlotGrid::enableX (bool on)"

.PP
Enable or disable vertical grid lines\&. 
.PP
\fBParameters\fP
.RS 4
\fIon\fP Enable (true) or disable
.RE
.PP
\fBSee also\fP
.RS 4
Minor grid lines can be enabled or disabled with \fBenableXMin()\fP 
.RE
.PP

.SS "void QwtPlotGrid::enableXMin (bool on)"

.PP
Enable or disable minor vertical grid lines\&. 
.PP
\fBParameters\fP
.RS 4
\fIon\fP Enable (true) or disable 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableX()\fP 
.RE
.PP

.SS "void QwtPlotGrid::enableY (bool on)"

.PP
Enable or disable horizontal grid lines\&. 
.PP
\fBParameters\fP
.RS 4
\fIon\fP Enable (true) or disable 
.RE
.PP
\fBSee also\fP
.RS 4
Minor grid lines can be enabled or disabled with \fBenableYMin()\fP 
.RE
.PP

.SS "void QwtPlotGrid::enableYMin (bool on)"

.PP
Enable or disable minor horizontal grid lines\&. 
.PP
\fBParameters\fP
.RS 4
\fIon\fP Enable (true) or disable 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableY()\fP 
.RE
.PP

.SS "const QPen & QwtPlotGrid::majorPen () const"

.PP
\fBReturns\fP
.RS 4
the pen for the major grid lines 
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetMajorPen()\fP, \fBsetMinorPen()\fP, \fBsetPen()\fP 
.RE
.PP

.SS "const QPen & QwtPlotGrid::minorPen () const"

.PP
\fBReturns\fP
.RS 4
the pen for the minor grid lines 
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetMinorPen()\fP, \fBsetMajorPen()\fP, \fBsetPen()\fP 
.RE
.PP

.SS "int QwtPlotGrid::rtti () const\fC [virtual]\fP"

.PP
\fBReturns\fP
.RS 4
\fBQwtPlotItem::Rtti_PlotGrid\fP 
.RE
.PP

.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "void QwtPlotGrid::setMajorPen (const QColor & color, qreal width = \fC0\&.0\fP, Qt::PenStyle style = \fCQt::SolidLine\fP)"
Build and assign a pen for both major grid lines
.PP
In Qt5 the default pen width is 1\&.0 ( 0\&.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() )\&. This method has been introduced to hide this incompatibility\&.
.PP
\fBParameters\fP
.RS 4
\fIcolor\fP Pen color 
.br
\fIwidth\fP Pen width 
.br
\fIstyle\fP Pen style
.RE
.PP
\fBSee also\fP
.RS 4
pen(), brush() 
.RE
.PP

.SS "void QwtPlotGrid::setMajorPen (const QPen & pen)"
Assign a pen for the major grid lines
.PP
\fBParameters\fP
.RS 4
\fIpen\fP Pen 
.RE
.PP
\fBSee also\fP
.RS 4
\fBmajorPen()\fP, \fBsetMinorPen()\fP, \fBsetPen()\fP 
.RE
.PP

.SS "void QwtPlotGrid::setMinorPen (const QColor & color, qreal width = \fC0\&.0\fP, Qt::PenStyle style = \fCQt::SolidLine\fP)"
Build and assign a pen for the minor grid lines
.PP
In Qt5 the default pen width is 1\&.0 ( 0\&.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() )\&. This method has been introduced to hide this incompatibility\&.
.PP
\fBParameters\fP
.RS 4
\fIcolor\fP Pen color 
.br
\fIwidth\fP Pen width 
.br
\fIstyle\fP Pen style
.RE
.PP
\fBSee also\fP
.RS 4
pen(), brush() 
.RE
.PP

.SS "void QwtPlotGrid::setMinorPen (const QPen & pen)"
Assign a pen for the minor grid lines
.PP
\fBParameters\fP
.RS 4
\fIpen\fP Pen 
.RE
.PP
\fBSee also\fP
.RS 4
\fBminorPen()\fP, \fBsetMajorPen()\fP, \fBsetPen()\fP 
.RE
.PP

.SS "void QwtPlotGrid::setPen (const QColor & color, qreal width = \fC0\&.0\fP, Qt::PenStyle style = \fCQt::SolidLine\fP)"
Build and assign a pen for both major and minor grid lines
.PP
In Qt5 the default pen width is 1\&.0 ( 0\&.0 in Qt4 ) what makes it non cosmetic ( see QPen::isCosmetic() )\&. This method has been introduced to hide this incompatibility\&.
.PP
\fBParameters\fP
.RS 4
\fIcolor\fP Pen color 
.br
\fIwidth\fP Pen width 
.br
\fIstyle\fP Pen style
.RE
.PP
\fBSee also\fP
.RS 4
pen(), brush() 
.RE
.PP

.SS "void QwtPlotGrid::setPen (const QPen & pen)"
Assign a pen for both major and minor grid lines
.PP
\fBParameters\fP
.RS 4
\fIpen\fP Pen 
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetMajorPen()\fP, \fBsetMinorPen()\fP 
.RE
.PP

.SS "void QwtPlotGrid::setXDiv (const \fBQwtScaleDiv\fP & scaleDiv)"
Assign an x axis scale division
.PP
\fBParameters\fP
.RS 4
\fIscaleDiv\fP Scale division 
.RE
.PP

.SS "void QwtPlotGrid::setYDiv (const \fBQwtScaleDiv\fP & scaleDiv)"
Assign a y axis division
.PP
\fBParameters\fP
.RS 4
\fIscaleDiv\fP Scale division 
.RE
.PP

.SS "void QwtPlotGrid::updateScaleDiv (const \fBQwtScaleDiv\fP & xScaleDiv, const \fBQwtScaleDiv\fP & yScaleDiv)\fC [virtual]\fP"
Update the grid to changes of the axes scale division
.PP
\fBParameters\fP
.RS 4
\fIxScaleDiv\fP Scale division of the x-axis 
.br
\fIyScaleDiv\fP Scale division of the y-axis
.RE
.PP
\fBSee also\fP
.RS 4
\fBQwtPlot::updateAxes()\fP 
.RE
.PP

.PP
Reimplemented from \fBQwtPlotItem\fP\&.
.SS "bool QwtPlotGrid::xEnabled () const"

.PP
\fBReturns\fP
.RS 4
true if vertical grid lines are enabled 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableX()\fP 
.RE
.PP

.SS "bool QwtPlotGrid::xMinEnabled () const"

.PP
\fBReturns\fP
.RS 4
true if minor vertical grid lines are enabled 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableXMin()\fP 
.RE
.PP

.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::xScaleDiv () const"

.PP
\fBReturns\fP
.RS 4
the scale division of the x axis 
.RE
.PP

.SS "bool QwtPlotGrid::yEnabled () const"

.PP
\fBReturns\fP
.RS 4
true if horizontal grid lines are enabled 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableY()\fP 
.RE
.PP

.SS "bool QwtPlotGrid::yMinEnabled () const"

.PP
\fBReturns\fP
.RS 4
true if minor horizontal grid lines are enabled 
.RE
.PP
\fBSee also\fP
.RS 4
\fBenableYMin()\fP 
.RE
.PP

.SS "const \fBQwtScaleDiv\fP & QwtPlotGrid::yScaleDiv () const"

.PP
\fBReturns\fP
.RS 4
the scale division of the y axis 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
